﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using BrewTarget.DB;

namespace BrewTarget.Web.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            DbHolder aDB = new DbHolder(Classes.Configuration.ConnectionString);

            int i = 0;
            using (IDataReader aDR = aDB.OpenDataReader("select * from hop where name = :theName", "adslkfj"))
            {
                while (aDR.Read())
                {
                    string aStr = Convert.ToString(aDR["name"]);
                    i++;
                }
            }
                


            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}